package com.ypinkj.app.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author jinbin
 * @date 2018-07-08 20:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("u_user")//@TableName中的值对应着表名
public class User {//个人用户
    @TableId(type = IdType.ID_WORKER_STR)
    String id;
    String username;
    String password;
    private String phone;
    private String token;
    //自动新增时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //自动更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //自动默认值0
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;
    private Integer status;

    public interface Status {
        int DISABLED = 0;
        int VALID = 1;
        int LOCKED = 2;
    }

    private int firstLogin;//是否第一次登录 0是第一次 1不是第一次登录
}
